home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / amos / AMOSList_0197.lzh / AMOSLIST / 000136_amos-request@svcs1.digex.net_Sat Jan 25 01:50:30 1997.msg < prev    next >
Internet Message Format  |  1997-02-02  |  2KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail3.access.digex.net (8.8.5/8.8.5) with ESMTP id BAA29557
  3.     for <mcox@access.digex.net>; Sat, 25 Jan 1997 01:50:27 -0500 (EST)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id AAA04590
  6.     for amos-out; Sat, 25 Jan 1997 00:01:02 -0500 (EST)
  7. Received: from mail3.access.digex.net (mail3.access.digex.net [205.197.247.4])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id AAA04587
  9.     for <amos-list@svcs1.digex.net>; Sat, 25 Jan 1997 00:01:00 -0500 (EST)
  10. Received: from hermes.beotel.net (ns.beotel.net [194.106.162.2])
  11.     by mail3.access.digex.net (8.8.5/8.8.5) with ESMTP id AAA25444
  12.     for <amos-list@access.digex.net>; Sat, 25 Jan 1997 00:00:55 -0500 (EST)
  13. Received: from setnet.UUCP (Usetnet@localhost) by hermes.beotel.net (8.7.6/8.6.12) with UUCP id FAA20899 for amos-list@access.digex.net; Sat, 25 Jan 1997 05:53:02 +0100
  14. X-Authentication-Warning: hermes.beotel.net: Usetnet set sender to setnet!smolenski using -f
  15. Received: by setnet.co.yu (0.99.960714)
  16.   id AA02831; 24 Jan 97 20:25:53 +0100
  17. From: smolenski@setnet.co.yu (Nikola Smolenski)
  18. Date: 24 Jan 97 20:19:12 +0100
  19. Subject: goto
  20. Message-ID: <a1c_9701242025@setnet.co.yu>
  21. Organization: SETNet - Ujedinjeni BBS-ovi Balkana
  22. To: amos-list@access.digex.net
  23. Status: RO
  24. X-Status: 
  25.  
  26.  
  27.  gs> Do
  28.  gs> Goto Rnd(4)
  29.  gs> 0
  30. <bla>
  31.  gs> 1
  32. <bla>
  33.  gs> 2
  34. <bla>
  35.  gs> 3
  36. <bla>
  37.  gs> 4
  38. <bla>
  39.  gs> Loop
  40.  
  41.  gs> How can I get the program to go to each label
  42.  gs> only once?  (randomly)
  43.  
  44.  gs> I do know some complicated ways to achive this but there must be some
  45.  gs> easy solution...?
  46.  
  47. I think this is the easiest:
  48. dim a(n)
  49. for i=1 to n
  50. a(i)=i
  51. next
  52. for i=1 to n
  53. r=rnd(n)+1
  54. goto r
  55. a(r)=a(n)
  56. dec n
  57. next
  58.  
  59. BTW, you can avoid line r=rnd(n), there is some command which gives you
  60. last number given by rnd, but I can't remember how it calls.
  61. _        _  _         _  _          _                                   _
  62. \--- :_ :_ :_::- --: : ::_) _: --- \/ ----------------------------------/
  63. \\_: !_)!_,! !!_,  !,!_!! \(_! ::::..::::      nEVERmIND     :::'`::::_//
  64. `\------------------------------------------------------------- /\ ----/'
  65.   Nikola Smolenski - member of Team AMIGA        smolenski@setnet.co.yu
  66.  
  67.  * *** NOVI SAAAAAAAAAD!!!!!!!!!!!!!!!!!!!!!!!!! *** *
  68.  
  69.  * AmyBW v2.14 *
  70. ... The Force is what gives the Jedi his power.  That and batteries.
  71. --- Blue Wave/RA